


<div class="nav_col">

    <div class="preview">
        <div class="contain">
            <a href="#"><img height="66" border="0" alt="" src="<?=thumbnail(base_url().UPLOADS_FOLDER.PORTFOLIO_IMG_FOLDER.$item["Main_Image"])?>"></a>
            <p><strong><a href="#"><?=$item["Name_Portfolio"]?></a></strong></p>

            <? if($item["Introduction_Portfolio"] !== ""){ ?>
                <p><?=$item["Introduction_Portfolio"]?> <a href="#" class="more">more...</a> </p>
            <? } ?>

        </div>           
    </div>

    <div class="buttons">                                                                                 

    <? if ($action == "view") { ?>

        <a href="<?=site_url('admin/portfolio/edit/'.$item['id_Portfolio'])?>" class="button">edit</a>
        <? if($item['Approved_Portfolio']==1) { ?>
            <? if ($item['Active_Portfolio'] == 1){ ?>            
            <a href="<?=site_url('admin/portfolio/deactivate/'.$item['id_Portfolio'])?>" class="button">deactivate</a>
            <? } else { ?> 
            <a href="<?=site_url('admin/portfolio/activate/'.$item['id_Portfolio'])?>" class="button">activate</a>
            <? } ?>
        <? } else if(is_allowed(array(ROLE_ADMIN,ROLE_PUBLISHER))){ ?>
            <a href="<?=site_url('admin/portfolio/approve/'.$item['id_Portfolio'])?>" class="button">approve</a>
        <? } ?>
        
        <a href="<?=site_url('admin/portfolio/remove/'.$item['id_Portfolio'])?>" class="button">delete</a>

        <? if ($item['Approved_Portfolio']!=1){ ?>
            <div class="preview_unapproved">This item is pending approval</div>
        <? } else if ($item['Active_Portfolio']!=1){ ?>
            <div class="preview_inactive">This item is inactive</div>
        <? } ?>

    <? } ?>

    </div>

</div>               


<div class="item_col preview">   

    <h1><?=$item["Name_Portfolio"]?></h1>

    <h4><?=$item["Introduction_Portfolio"]?></h4>
    <div class="sansserif"><?=$this->glossarymodel->link_glossary_terms($item["Description_Portfolio"], TRUE)?></div>

    <div class="productcontainer">
        <div class="productmain">
            <img height="385" border="0" width="589" alt="" src="<?=base_url().UPLOADS_FOLDER.PORTFOLIO_IMG_FOLDER.$item["Main_Image"]?>"/>
        </div>

        <?if(!empty($images)){?>
        <div class="productcontainer">
            <? foreach($images as $image) { ?>  
            <div class="productthumb">
                <a href="#">
                    <img height="66" border="0" width="106" src="<?=thumbnail(base_url().UPLOADS_FOLDER.PRODUCT_IMG_FOLDER.$image)?>" alt="" />          
                </a>
            </div>
            <? } ?>
        </div>
        <? } ?>        
    </div>

    <? if (!empty($products)) { ?>
    <div class="summarycontainer">
        <div class="containsansfullwidth">
            <p>
                <b>Products used in this application:</b>
            </p>

        <? foreach($products as $item) { ?>

            <p><a href="#"><?=$item['Name_Products']?></a></p>

        <?  } ?>

        </div>
    </div>
    <? } ?>

</div>